package com.wyzz.hr.dao.impl;

import com.wyzz.hr.dao.IEmployeeDAO;
import com.wyzz.hr.hibernate.impl.HibernateUtil;

import java.util.List;

public class EmployeeDAOImpl extends HibernateUtil implements IEmployeeDAO {

	public EmployeeDAOImpl() {
	}

	public List subEmpNos(String no, Integer status) {
		String stat = status != null ? (new StringBuilder()).append(
				" and empStatus=").append(status).append(" ").toString() : "";
		return exeHqlList((new StringBuilder()).append(
				"select id from Employee where id!=empSupNo.id ").append(stat)
				.append(" and id != '").append(no.trim()).append(
						"' and empSupNo.id='").append(no.trim()).append("'")
				.toString());
	}
}
